package com.zx.core.utils;

import java.util.UUID;

/**
 * <p>
 * description: Id 生成工具 <br>
 * create: 2024-10-03 17:51
 * </p>
 *
 * @author zhou  xun
 */
public class IdUtils {
    public static String getUUID() {
        return UUID.randomUUID().toString().replaceAll("-", "");
    }

    public static void main(String[] args) {
        // 调用5次生成5个ID，使用Java 8语法
        for (int i = 0; i < 5; i++) {
            System.out.println("ID " + (i + 1) + ": " + getUUID());
        }
    }
}